package org.scboy.coobi.utils;

import java.util.Map;

public class DataUtil {

	@SuppressWarnings("unchecked")
	public static Object getData(Map<String, Object> model,String kestr){
		String [] keys=kestr.split("\\.");
		Object value=null;
		for (int i = 0; i < keys.length; i++) {
			if(model==null){
				return value;
			}
			String key = keys[i];
			if(i!=keys.length-1){
				model=(Map<String, Object>)model.get(key);
			}else{
				value=model.get(key);
			}
		}
		return value;
	}
	
}
